FROM mysql:5.7

ENV WORK_PATH /usr/local/work

ENV AUTO_RUN_DIR /docker-entrypoint-initdb.d


ENV SQL_FILE init-db.sql

ENV INIT_SHELL initialdb.sh


RUN mkdir -p $WORK_PATH

COPY ./${SQL_FILE} ${WORK_PATH}
COPY ./${INIT_SHELL} ${AUTO_RUN_DIR}

RUN chmod a+x  ${AUTO_RUN_DIR}/${INIT_SHELL}
